import Vue from 'vue'
import Router from 'vue-router'
import Home from './components/home.vue'

Vue.use(Router)

var router = new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/implement',
      component: Home,
      children: [{
        path: 'implement',
        component: () => import(/* webpackChunkName: "implement" */ './views/implement/implement.vue'),
      }, {
        path: 'implement-detail/:orderId', 
        name:'ImplementDetail',
        component: () => import(/* webpackChunkName: "implement-detail" */ './views/implement/implement-detail.vue'),
      },{
        path: 'maintainence',
        component: () => import(/* webpackChunkName: "maintainence" */ './views/maintainence/maintainence.vue'),
      }, {
        path: 'maintainence/in_progress/:id',
        name:'InProgress',
        component: () => import(/* webpackChunkName: "in-progress" */ './views/maintainence/in-progress.vue'),
      }, {
        path: 'maintainence/wrong_list/:id',
        name:'WrongInfo',
        component: () => import(/* webpackChunkName: "wrong-list" */ './views/maintainence/wrong-list.vue'),
      },{
        path: 'users',
        component: () => import(/* webpackChunkName: "users" */ './views/users/users.vue'),
      }, {
        path: 'equipment',
        component: () => import(/* webpackChunkName: "equipment" */ './views/equipment/equipment.vue'),
      }, {
        path: 'report',
        component: () => import(/* webpackChunkName: "report" */ './views/report/report.vue'),
      },{
        path: 'report/reportInfo/:id',
        name:"ReportInfo",
        component: () => import(/* webpackChunkName: "report" */ './views/report/report-info.vue'),
      },{
        path: 'report/paperReportInfo/:id',
        name:"PaperReportInfo",
        component: () => import(/* webpackChunkName: "report" */ './views/report/paper-info.vue'),
      }]
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import(/* webpackChunkName: "login" */ './views/login.vue')
    }
  ]
})

export default router;

